C51 COMPILER V7.06   MAIN                                                                  10/24/2007 13:51:42 PAGE 1   


C51 COMPILER V7.06, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN .\Out\main.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Code\main.c BROWSE DEBUG OBJECTEXTEND PRINT(.\main.lst) OBJECT(.\Out\main.o
                    -bj)

stmt level    source

   1          //=========================================================================
   2          //
   3          //                  S Y N C M O S   T E C H N O L O G Y
   4          //
   5          //           COPYRIGHT (c)   2007 BY SyncMOS Technologies International,Inc.
   6          //                     --  ALL RIGHTS RESERVED  --
   7          //
   8          // File Name : main.c    
   9          // Created: 2007/10/11
  10          // Author: Raleigh Chang
  11          // Description:
  12          //      This project is for SM59D04G2 EEPROM Demo
  13          // Revision: 0.1
  14          // History:
  15          //=========================================================================
  16          #include "main.h"
  17          cByte TB[5],TC[10] ;
  18          //code TB[5]={0x00,0x01,0x02,0x03,0x04};
  19          extern void EEPROM_Byte_Program( Word eFlashAddr , Byte eFlashData );
  20          extern void EEPROM_Page_Clean( Word eFlashAddr );
  21          extern void EEPROM_Byte_change( Word eFlashAddrCustomer1,Word eFlashAddrBuffer1,Word eFlashAddr1 ,Byte eFl
             -ashData1, iWord Number1 );
  22          extern void EEPROM_Byte_change_Eram( Word eFlashAddrCustomer,Word eFlashAddr ,Byte eFlashData, iWord Numbe
             -r );
  23          //===============================
  24          void main(void)
  25          {               
  26   1      //----------------Byte_Program---------------//
  27   1      /*
  28   1                      EEPROM_Page_Clean( 0x3000 );                    //Page 0x3000 ~0x31FF clean before program
  29   1                      EEPROM_Byte_Program( 0x3000 , 0x50);    //Program 0x3000 to customer code 0x50
  30   1                      EEPROM_Byte_Program( 0x3001 , 0x51);    //Program 0x3001 to customer code 0x51   
  31   1                      EEPROM_Byte_Program( 0x3002 , 0x52);    //Program 0x3002 to customer code 0x52
  32   1                      EEPROM_Byte_Program( 0x3003 , 0x53);    //Program 0x3003 to customer code 0x53
  33   1                      EEPROM_Byte_Program( 0x3100 , 0x60);    //Program 0x3100 to customer code 0x60
  34   1                      EEPROM_Byte_Program( 0x3101 , 0x61);    //Program 0x3101 to customer code 0x61
  35   1                      EEPROM_Byte_Program( 0x3102 , 0x62);    //Program 0x3101 to customer code 0x61
  36   1                      EEPROM_Byte_Program( 0x3103 , 0x63);    //Program 0x3101 to customer code 0x61
  37   1      */
  38   1      //----------------Byte Program_table---------------//           
  39   1                      cByte TB[5]={0x20,0x21,0x22,0x23,0x24};
  40   1                      cByte TC[10]={0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3A,0x3B,0x3C};
  41   1                      iWord   address;
  42   1                      iByte   i;
  43   1      
  44   1                      EEPROM_Page_Clean( 0x3000 );                    //Page 0x3000 ~0x31FF clean before program
  45   1      
  46   1                      address = 0X3000;                                               //Program TB table to 0x3000~0x3004
  47   1                      for (i=0;i<5;i++)
  48   1                      {
  49   2                      EEPROM_Byte_Program( address , TB[i]); 
  50   2                      address = address + 1;
  51   2                      }
  52   1      
C51 COMPILER V7.06   MAIN                                                                  10/24/2007 13:51:42 PAGE 2   

  53   1                      address = 0x3100;                                               //Program TC table to 0x3100~0x3109                             
  54   1                      for (i=0;i<10;i++)
  55   1                      {
  56   2                      EEPROM_Byte_Program( address , TC[i]); 
  57   2                      address = address + 1;
  58   2                      }
  59   1      //----------------byte_change_use Expand Ram to do buffer---------------//
  60   1      
  61   1                      EEPROM_Byte_change_Eram( 0x3000,0x3001 ,0x55, 0x0200 );  //The customer code area from 0x3000 to 0x31FF;
  62   1                                                                                                                                   //Change customer code at 0x3001 to 0x55, 
  63   1                                                                                                                                   //Total use 512 Bytes (Max)
  64   1                      EEPROM_Byte_change_Eram( 0x3000,0x3002 ,0xaa, 0x0200 );  //Change customer code at 0x3002 to 0xaa,
  65   1                      EEPROM_Byte_change_Eram( 0x3000,0x3103 ,0x66, 0x0200 );  //Change customer code at 0x3103 to 0x66,
  66   1                      EEPROM_Byte_change_Eram( 0x3000,0x3104 ,0x99, 0x0200 );  //Change customer code at 0x3104 to 0x99,
  67   1      
  68   1      //----------------byte_change_use flash to do buffer---------------//
  69   1      /*
  70   1                      EEPROM_Byte_change( 0x3000,0x3C00,0x3005,0x66,0x0200 );  //The customer code area from 0x3000 to 0x31FF;
  71   1                                                                                                                                       //The Buffer code area from 0x3C00 to 0x3DFF;
  72   1                                                                                                                                       //Change customer code at 0x3001 to 0xAA, 
  73   1                                                                                                                                       //Total use 512 Bytes (Max)
  74   1                      EEPROM_Byte_change( 0x3000,0x3C00,0x3006,0x99,0x0200 );  //EEPROM_Byte_change(EEPROMstaradder,EEPROMchan
             -geadder,EEPROMchangedata,Buffer size)
  75   1                      EEPROM_Byte_change( 0x3000,0x3C00,0x3007,0x55,0x0200 );                                                                                                          
  76   1                      EEPROM_Byte_change( 0x3000,0x3C00,0x3008,0xaa,0x0200 );
  77   1      */
  78   1      
  79   1        
  80   1              while(1)
  81   1              {
  82   2              P2 = 0x55;
  83   2              }
  84   1      }
  85          


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    222    ----
   CONSTANT SIZE    =     30    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----      15
   IDATA SIZE       =   ----       3
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
